<script setup lang="ts">
const el = ref(null)
const show = ref(false)
useIntersectionObserver(el, ([{ isIntersecting }]) => {
  if (isIntersecting)
    show.value = isIntersecting
})
</script>

<template>
  <div id="ygfl" ref="el" class="yuangongfuli">
    <Transition name="animate-zoomIn">
      <div v-show="show" class="wrap">
        <img class="img" src="https://public-oss-file.zmaxfilm.com/website-compress/join-7.png" alt="图片">
        <div class="content">
          <span class="title">员工福利</span>
          <span class="text-[18px] mt-[16px]">五险一金、生日礼金、节日礼金、婚丧礼金、慰问金、高温补贴、培训学习、团建经费</span>
        </div>
      </div>
    </Transition>
  </div>
</template>

<style lang="scss" scoped>
.yuangongfuli {
  width: 1200px;
  margin: 0 auto;
  min-height: 490px;
  padding-bottom: 80px;

  .wrap {
    height: 490px;
    z-index: 1;
    position: relative;

    .img {
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      position: absolute;
    }

    .content {
      top: 50%;
      right: 0;
      width: 600px;
      padding: 15px;
      display: flex;
      position: absolute;
      flex-direction: column;
      justify-content: center;
      transform: translateY(-50%);

      .title {
        line-height: 1;
        font-size: 34px;
        font-style: italic;
        font-family: PangMenZhengDaoBiaoTiTi;
      }
    }

  }
}
</style>
